$(function(){
	$('#topmenus a').click(function(){
		var mid = $(this).attr('mid');
		if(mid!=0)$('#xLeft').attr('src','admin.php?act=left&menuid='+mid);
	});
	$('#main_line').hover(function(){
		$(this).addClass('over');
	},function(){
		$(this).removeClass('over');
	}).click(function(){ hideLeft(); });
	
	$(window).resize(function(){chageUI();});
	chageUI();
});
function hideLeft(){
	var m_Left = $('#main_left');
	if(m_Left.css('display')=='none'){ m_Left.show(); $('#main_line').html("&lt;");		
	}else{ m_Left.hide(); $('#main_line').html("&gt;"); }
}
function chageUI(){
	var winHeight = $(window).height();
	var main_height=winHeight-$('#header').height()-$('#footer').height();	
	$('#main').height(main_height);
	$('#main table').height(main_height);
}